package com.xy.order.service.dto.impl;

import com.ruoyi.common.core.domain.order.vo.Cleaning;
import com.ruoyi.common.core.domain.user.Address;
import com.ruoyi.common.core.mapper.order.vo.TakeOrdersMapper;
import com.xy.order.service.dto.TakeOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户实现下单
 */
@Service
public class TakeOrderServiceImpl implements TakeOrderService {
    @Autowired
    private TakeOrdersMapper takeOrdersMapper;

    /**
     * 1. 用户去下单
     * @param cleaning
     * @return
     */
    @Override
    public List<Cleaning> listCleanings(Cleaning cleaning) {
        return takeOrdersMapper.listCleanings(cleaning);
    }

    /**
     * 2. 获取用户地址
     * @param userId
     * @return
     */
    @Override
    public List<Address> listUserAddresses01(Long userId) {
        return takeOrdersMapper.listUserAddresses01(userId);
    }
}
